<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Payment
 *
 * @author incoder
 */
class Payment extends AppModel {

    public $name = "Payment";
    var $actsAs = array('Logable' => array(
            'userModel' => 'User',
            'userKey' => 'user_id',
            'change' => 'full', // options are 'list' or 'full'
            'description_ids' => TRUE // options are TRUE or FALSE
            ));
    public $belongsTo = array(
        'Proyect' => array(
            'className' => 'Proyect',
            'foreignKey' => 'proyect_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
    );
    var $hasMany = array(
        'PaymentReview' => array(
            'model' => 'PaymentReview',
            'dependent' => true
        )
    );
    
    var $virtualFields = array('suma_monto' => 'SUM(Payment.monto)');

    

}

?>
